<template>
  <div class="descwrap">
      <h1>{{maptitle}}地图</h1>
      <div v-for="(each,i) of mapData" :key="i">
          <img :src="each.mappicture" alt="" class="mapimg">
          <div class="mapdesc"><h5>{{each.mapname}}</h5><p>{{each.mapdesc}}</p></div>
      </div>
  </div>
</template>

<script>
export default {
mounted(){
    this.maptitle=this.$route.params.mapname.title
    this.getMap();
    this.test()
    // console.log(this.maptitle.mapname.title)
},
data(){
    return{
        mapData:[],
        maptitle:''
    }
},
methods:{
    test(){
this.$axios.get('ceshi').then((res)=>{
    console.log(res.data)
})
    },
    getMap(){
        console.log(123)
        // console.log(this.$axios.get('map'))
        this.$axios.get('map').then((res)=>{
            // console.log(res)
            console.log('ok')
            this.mapData=res.data.msg;
        })
        // console.log(this.maplist.mapname.title)
    }
}
}
</script>

<style lang="scss" scoped>
.descwrap{
    padding: 10px;
    // background:require('../assets/login/csgo_bg.jpg');
}
.mapimg{
    width: 100%;
}
</style>>